#include <iostream>
#include "object_model.hpp"

class Base {
public:
    virtual void greet() { std::cout << "Hello from Base\n"; }
    virtual ~Base() {}
};

class Derived : public Base {
public:
    void greet() override { std::cout << "Hello from Derived\n"; }
};

void object_model_test() {
    Base* obj = new Derived();
    obj->greet();  // 验证虚函数与虚表一致性
    delete obj;
}
